package com.sportschain.app.mine;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.sportschain.app.R;
import com.sportschain.app.core.base.BasePagerFragment;
import com.sportschain.app.mine.activity.DiscountCouponActivity;
import com.sportschain.app.mine.activity.EnergyActivity;
import com.sportschain.app.mine.activity.FollowActivity;
import com.sportschain.app.mine.activity.LoginActivity;
import com.sportschain.app.mine.activity.SettingActivity;
import com.sportschain.app.mine.activity.TransactionActivity;

import butterknife.BindView;
import butterknife.OnClick;

public class MineFragment extends BasePagerFragment {


    @BindView(R.id.intro_tv)
    TextView mIntroTv;
    @BindView(R.id.energy_ll)
    LinearLayout mEnergyLl;
    @BindView(R.id.discount_coupon_ll)
    LinearLayout mDiscountCouponLl;
    @BindView(R.id.transaction_ll)
    LinearLayout mTransactionLl;
    @BindView(R.id.follow_ll)
    LinearLayout mFollowLl;
    @BindView(R.id.setting_ll)
    LinearLayout mSettingLl;
    @BindView(R.id.logout_ll)
    LinearLayout mLogoutLl;

    public static MineFragment newInstance() {

        Bundle args = new Bundle();

        MineFragment fragment = new MineFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_mine;
    }

    @Override
    protected void initView(View view, Bundle savedInstanceState) {

    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initListener() {

    }

    @OnClick({R.id.energy_ll, R.id.discount_coupon_ll, R.id.transaction_ll, R.id.follow_ll, R.id.setting_ll, R.id.logout_ll})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.energy_ll:
                startActivity(EnergyActivity.class);
                break;
            case R.id.discount_coupon_ll:
                startActivity(DiscountCouponActivity.class);
                break;
            case R.id.transaction_ll:
                startActivity(TransactionActivity.class);
                break;
            case R.id.follow_ll:
                startActivity(FollowActivity.class);
                break;
            case R.id.setting_ll:
                startActivity(SettingActivity.class);
                break;
            case R.id.logout_ll:
                startActivity(LoginActivity.class);
                break;
        }
    }
}
